//
//  FeaturesViewModel.swift
//  Chatup
//
//  Created by iron man on 2024/1/13.
//

import Foundation
import SwiftUI
@MainActor
class FeaturesViewModel: ObservableObject {
    @Published var items:[FeaturesModel] = []
    
    init() {
        items.append(.init(title: String.i18nText("feature_draw"), iconName: "🧚",des: String.i18nText("feature_imagination"),color: Color(UIColor(red: 0.15, green: 0.75, blue: 0.46, alpha: 1))))
        items.append(.init(title: String.i18nText("feature_recognize"), iconName: "📷",des: String.i18nText("feature_images"),color: Color(UIColor(red: 0.97, green: 0.55, blue: 0.19, alpha: 1))))
        items.append(.init(title: String.i18nText("feature_summarize"), iconName: "📄",des: String.i18nText("feature_document"),color: Color(UIColor(red: 0.96, green: 0.87, blue: 0.36, alpha: 1))))
        items.append(.init(title: String.i18nText("feature_analyze"), iconName: "🔗",des: String.i18nText("feature_analyze"),color: Color(UIColor(red: 0.32, green: 0.51, blue: 0.98, alpha: 1))))
       
    }
}


struct FeaturesModel:Identifiable {
    let id = UUID()
    let title:String
    let iconName:String
    let des:String
    let color:Color?
    init(title: String, iconName: String,des: String, color:Color? = .red) {
        self.title = title
        self.iconName = iconName
        self.color = color
        self.des = des
    }
}
